#!/bin/bash
echo "************************************************"
echo "*                                              *"
echo "*                    rhmea                     *"
echo "*                                              *"
echo "*    Compute mean vertical Relative Humidity   *"
echo "*                   from .rhu                  *"
echo "*                                              *"
echo "*     Martin Aube 2000                         *"
echo "*                                              *"
echo "************************************************"
echo " "
folder=`pwd`
rm -f core
echo " Experiment directory "$folder
if [ -f rhmoyen.par ] 
   then   echo " Using existing input parameter file: rhmoyen.par"

   else   epar_rhmea   
fi 
echo " Preparing input files..."
ln -s ~/AODSEM/Bin/rhmoyen rhmoyen
echo " Executing rhmoyen..."
./rhmoyen
echo " Deleting temporary files in " $folder
rm -f rhmoyen
if [ -f core ] 
   then   echo "******** An error occured during execution of corco! ********"
   rm -f core
   echo "Hit <CTRL-c> or <CRTL-z> to kill that process"
   read bidon
else
  echo " Normal end of rhmea." 
fi 

